package com.mxpio.erp.common.technology.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.mxpio.erp.common.jpa.policy.ResCodeGeneratorPolicy;
import com.mxpioframework.jpa.BaseEntity;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_INVENTORY_ITEM")
@ApiModel(value="物料")
public class Item extends BaseEntity {

	private static final long serialVersionUID = 1L;
	
	@Id
	@Generator(policy = ResCodeGeneratorPolicy.class)
	@Column(name = "ITEM_CODE_", updatable = false)
	@ApiModelProperty(value = "物料编码")
	private String itemCode;
	
	@Column(name = "ITEM_NAME_")
	@ApiModelProperty(value = "物料名称")
	private String itemName;
	
	@Column(name = "ITEM_TYPE_CODE_")
	@ApiModelProperty(value = "类别代码")
	private String itemTypeCode;
	
	@Column(name = "ITEM_SPEC_")
	@ApiModelProperty(value = "物料规格")
	private String itemSpec;
	
	@Column(name = "DRAWING_NO_")
	@ApiModelProperty(value = "图号")
	private String drawingNo;
	
	@Column(name = "UNIT_CODE_")
	@ApiModelProperty(value = "单位编号")
	@Dict(dicCode="ERP_TECH_FEEDING_MODE")
	private String unitCode;
	
	@Column(name = "ITEM_SOURCE_")
	@ApiModelProperty(value = "物料来源")
	@Dict(dicCode="ERP_ITEM_SOURCE")
	private String itemSource;
	
	@Column(name = "ABC_CODE_")
	@ApiModelProperty(value = "ABC码")
	private String abcCode;

}
